import { resolve } from 'path'
import { defineConfig } from 'vite'
import eslintPlugin from 'vite-plugin-eslint'
import Tov from './presets/tov'
import ZipBuildDir from './presets/vite-plugins/vitePluginZipBuildDir'

export default defineConfig({
  resolve: {
    alias: {
      '~/': `${resolve(__dirname, 'src')}/`,
    },
  },
  plugins: [
    // 编译时用eslint进行代码检查
    eslintPlugin({
      cache: false,
    }),
    Tov(),
    ZipBuildDir(),
  ],
})
